﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lidgren.Network;

namespace D2D2.SharedInterfaces.Networking
{
    public class MouseMessage : BaseMessage
    {
        public MouseMessage()
        {

        }

        public MouseMessage(NetIncomingMessage message):base(message)
        {

        }

        public override GameMessageType MessageType
        {
            get { return GameMessageType.MouseMessage; }
        }

        public int X { get; set; }
        public int Y { get; set; }
        public long PlayerId { get; set; }

        public override void Encode(NetOutgoingMessage message)
        {
            message.Write(X);
            message.Write(Y);
            message.Write(PlayerId);
        }

        public override void Decode(NetIncomingMessage message)
        {
            X = message.ReadInt32();
            Y = message.ReadInt32();
            PlayerId = message.ReadInt64();
        }
    }
}
